#!/usr/bin/env bash

# 启动 SSH 服务
/usr/sbin/sshd -D &

# 等待 SSH 服务启动完成
while ! nc -z localhost 22; do
  sleep 0.1
done

# 输出日志
echo "SSH service started successfully."

# 保持容器运行
# tail -f /dev/null
exec "$@"